const fs=require('fs')
fs.readFile('buffer.js','utf-8',(error,document)=>{
    console.log(error);
    console.log(document);
})
let content='let test2="这个是追加进去的内容"'
fs.writeFile('buffer.js',content,error=>{
    if(error!==null){
        console.log(error);
        return
    }
    console.log('追加成功！');
})